package com.atguigu.auth.mapper;

import com.atguigu.model.system.SysRole;
import com.atguigu.model.system.SysUserRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 12646
 * @description 针对表【sys_user_role(用户角色)】的数据库操作Mapper
 * @createDate 2023-11-14 15:25:55
 * @Entity com.atguigu.auth.Impl.SysUserRole
 */
@Mapper
public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {
  
  // 根据用户获取角色数据
 List<SysRole> selectRoleByUserId(@Param("id") Long id);
 
  // 根据用户分配角色
  void updateUserRoleByUserId(@Param("id") Long id, @Param("roleList") List roleList);
  void deleteUserRoleByUserId(@Param("id") Long id);
  
  // 修改用户状态
  // Long id, @PathVariable Integer status
  void updateUserStatusById(@Param("id") Long id,@Param("status") Integer status);
}




